import type { ICommonDataRes, IDataBase, IPigeQueryRes } from "@/types";
// import { IPermission } from "../menu/type";

/** 用户基本类型 */
export interface IUserBase extends IDataBase {
  userId?: number;
  username?: string;
  password?: string;
  email?: string;
  roleNames?: string[];
  roleIds?: string[];
  permissionIds?: string[];
  mobile?: string;
  /** 头像|化身 ˈævətɑːr */
  avatar?: string;
}

export type IUserUpdate = Pick<IUserBase, "username" | "name" | "_id">;

export type IUserAdd = Pick<IUserBase, "username" | "password" | "name">;

/** 用户分页查询Data返回类型 */
export type IUserPigeRes = IPigeQueryRes<IUserBase>;

/** 更新、删除、新增用户返回类型 */
export type IConmmonUserRes = ICommonDataRes;

/** 用户分页查询返回类型 */
export type IUserListResData = ICommonDataRes<IUserPigeRes>;
